package com.sjtuy.galtxtreader.gal;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public class SLListAdapter extends BaseAdapter {
    private Context context;
    private int mode;
    private SLListItemView.SLDoer slDoer;
    private TextProvider textProvider;

    public SLListAdapter(Context context,  SLListItemView.SLDoer slDoer,TextProvider textProvider){
        this.context=context;
        this.slDoer=slDoer;
        this.textProvider=textProvider;
    }

    public void setMode(int mode) {
        this.mode = mode;
    }

    @Override
    public int getCount() {
        return 5;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        SLListItemView slListItemView = new SLListItemView(context,mode,position,slDoer,textProvider);
        return slListItemView;
    }


}
